package 练习03_多线程交互实现生产者消费者问题;

/**
 * @ClassName: TestThreadProductConsume
 * @Author: AllenSun
 * @Date: 2022/3/18 下午11:38
 */
public class TestThreadProductConsume {
    public static void main(String[] args) {
        MyStack<Character> stack = new MyStack<>();
        for (int i=0;i<5;i++) {
            new ProducerThread(stack,"生产者"+i).start();
        }

        for (int i=0;i<5;i++) {
            new ConsumerThread(stack,"消费者"+i).start();
        }

    }
}
